#include <iostream>
#include "bit_manip.hpp"

unsigned char data[] = { 'F', 'E', 'E' };

int main( /* int argc, char* argv[] */ )
{
	//bit::print('F');
	//bit::print(data);
	//bit::print(data, data+3);

	//typedef boost::uint_t<7>::least  t1;
	//typedef boost::uint_t<8>::least  t2;
	//typedef boost::uint_t<31>::least t3;
	//typedef boost::uint_t<32>::least t4;
	//typedef boost::uint_t<63>::least t5;
	//typedef boost::uint_t<64>::least t6;
	//std::cout << typeid(t1).name() << std::endl;
	//std::cout << typeid(t2).name() << std::endl;
	//std::cout << typeid(t3).name() << std::endl;
	//std::cout << typeid(t4).name() << std::endl;
	//std::cout << typeid(t5).name() << std::endl;
	//std::cout << typeid(t6).name() << std::endl;

	bit::print( bit::mask<6, 3>::value );		std::cout << std::endl;

	bit::print( bit::mask<7>::value );		std::cout << std::endl;
	bit::print( bit::mask<8>::value );		std::cout << std::endl;
	bit::print( bit::mask<31>::value );		std::cout << std::endl;
	bit::print( bit::mask<32>::value );		std::cout << std::endl;
	bit::print( bit::mask<63>::value );		std::cout << std::endl;
	//bit::print( bit::mask<64>::value );		std::cout << std::endl;

	bit::print('f');
	std::cout << std::endl;
	bit::print('f');




	//int xxx = bit::get<0>('F');
	auto xxx = bit::mask<0>::value;
	bit::print(xxx);

	auto xxx2 = bit::mask<0>::value;
	bit::print(xxx2);

	//float f;
	//bit::print(f);

	return 0;
}


//-----------------------------------------------------------------------------------------------

////TODO: ver result_of en d:\Program Files\Boost\boost_1_48_0\boost\fusion\sequence\intrinsic\at.hpp
//
//#include <algorithm>
//#include <iostream>
//
//#include "permutator.hpp"
////#include <boost/mpl/at.hpp>
////#include <boost/mpl/vector_c.hpp>
//
////typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5, 6, 7, 8> table;
//
//unsigned char data[] = { 'F', 'E', 'E' };
//unsigned char result[] = { 0 };
//
////template <typename PermutationTable>
////struct permutator
////{
////	template < int Index >
////	static void call()
////	{
////		using boost::mpl::at_c;
////
////		const int tmp_idx = Index;												//TODO: agregar static
////		const int perm_idx = at_c<PermutationTable, Index>::type::value;		//TODO: agregar static
////	}
////};
////
////template <typename Iterator>
////void f( Iterator it, Iterator end )
////{
////	for ( ; it != end; ++it )
////	{
////		std::cout << *it << std::endl;
////	}
////}
//
//int main( /* int argc, char* argv[] */ )
//{
//	
//	//typedef permutator<table> perm;
//	//perm::call<0>();
//
//
//	//f( data, data+3 );
//
//
//	//std::transform()
//		
//
//	return 0;
//}


//-----------------------------------------------------------------------------------------------


//#include <boost/mpl/transform.hpp>
//#include <boost/mpl/vector.hpp>
//#include <boost/type_traits/add_pointer.hpp>
//
//int main( /* int argc, char* argv[] */ )
//{
//	using boost::mpl::vector;
//	using boost::mpl::transform;
//	using boost::mpl::_1;
//
//	
//
//	typedef vector<char,short,int,long,float,double> types;
//	typedef vector<char*,short*,int*,long*,float*,double*> pointers;
//	typedef transform< types, boost::add_pointer<_1> >::type result;
//
//	//BOOST_MPL_ASSERT(( equal<result,pointers> ));
//
//	return 0;
//}



